import request from "@/utils/request";
export function getAllTable(data){
  return request({
    url:"/onlineTable/onlineTable/list",
    method:'get',
    params:data
  })
}

export function defaultFields(){
  return request({
    url:'/onlineTableField/defaultFields',
    method:'get'
  })
}

export function fieldTypes(){
  return request({
    url:'/onlineTableField/getFieldType',
    method:'get'
  })
}


export function addTable(data){
  return request({
    url:'/onlineTable/onlineTable/add',
    method:'post',
    data
  })
}

export function deleteById(data){
  return request({
    url:'/onlineTable/onlineTable/deleteById',
    method:'get',
    params:data
  })
}

export function getByName(data){
  return request({
    url:'/onlineTable/onlineTable/getByTableName',
    method:'get',
    params:data
  })
}


export function edit(data){
  return request({
    url:'/onlineTable/onlineTable/edit',
    method:'post',
    data
  })
}

export function sync(data){
  return request({
    url:'/onlineTable/onlineTable/syncDb',
    method:'get',
    params:data
  })
}

export function codeGenerate(data){
  return request({
    url:'/onlineTable/onlineTable/codeGenerate',
    method:'post',
    data
  })
}

